// page/account/account.js
Page({
  data: {
      isHide: 0,
      thumb: '',
      nickname: '',
      phone: '还未绑定手机'
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onShow: function (options) {
      var that = this;
      var app = getApp()
      /**
      * 获取用户信息
      */
      var userface = wx.getStorageSync('img');
      var username = wx.getStorageSync('name');
      var uid = wx.getStorageSync('uid');
      wx.request({						
        url: app.globalData.host + '&g=App&m=Cart&a=userphone', //仅为示例，并非真实的接口地址
        data: { id:uid },
        header: {
          'content-type': 'application/json'
        },
        success: function (res) {
          that.setData({
            phone: res.data.phone
          })
        }
      });
      that.setData({
        isHide: 1,
        thumb: userface,
        nickname: username
      })
      
  }

})